mkdir esdata
docker stop  elasticsearch
docker rm  elasticsearch
chmod 777 esdata 
docker run -d --name elasticsearch  -v "$(pwd)/esdata":/usr/share/elasticsearch/data -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.4.2  
docker ps -a |grep elastic


exit 0
 

docker run -d --name elasticsearch -v "$(pwd)/esdata":/usr/share/elasticsearch/data  -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:5-alpine 
docker ps -a |grep elastic

docker exec -it  elasticsearch bash
